Processors specification

Each sensor can have one or more processors associated with it.

The processors are specified in the YAML configuration file as a sequence under the processors key. The parameters for each processor include:

  • type: the type of processor (class name)

  • plugin: the WOLF plugin where this class is implemented (used to load the plugin in runtime).

  • name: a unique name for the processor.

  • sensor_name: the name of the sensor to which this processor is attached.

  • time_tolerance: the time tolerance for the processor, which defines how much time difference is allowed to join to an existing keyframe.

  • apply_loss_function: a boolean indicating whether to apply the loss function to the factors produced by the processor.

  • keyframe_vote/voting_active: a boolean indicating whether to allow the processor to vote and eventually create new keyframes.

  • Other parameters specific to the processor type.

Note

Remember that the YAML templates contains all the parameters of each class and a brief doc. You can start from the templates and modify them to suit your needs. See more information in the YAML schema section.

The following is the part of the WOLF ROS2 application example configuration file, containing the processors specification.

processors:
  -
    type: "ProcessorOdom2d"
    name: "processorodom"
    sensor_name: "sensor_odom"
    plugin: "core"
    time_tolerance: 0.01
    apply_loss_function: false
    debug_verbose_level: "none"
    keyframe_vote:
      voting_active: false
      max_time_span: 10
      max_buff_length: 0
      max_dist_traveled: 1
      max_angle_turned: 0.5
      max_cov_det: 1e3
    unmeasured_perturbation_std: 1e-3
    state_provider: true
    state_provider_order: 1
  -
    type: "ProcessorOdomIcp"
    name: "processorodomicp"
    sensor_name: "laser_scan"
    plugin: "laser"
    time_tolerance: 0.01
    dimension: 2
    debug_verbose_level: "none"
    keyframe_vote:
      voting_active: true
      dist_traveled: 1
      angle_turned: 0.5
      time_span: 5.0
      invalid_icp: false
      consecutive_invalid_icp_patience : 1.0
      consecutive_invalid_icp_timeout  : 5.0
    icp:
      follow: "csm.yaml"
    initial_guess: "odom"
    apply_loss_function: false
    state_provider: true
    state_provider_order: 2
  -
    type: "ProcessorLoopClosureIcp"
    name: "processorloopclosureicp"
    sensor_name: "laser_scan"
    plugin: "laser"
    time_tolerance: 0.01
    apply_loss_function: true
    debug_verbose_level: "none"
    keyframe_vote:
      voting_active: false
    recent_frames_ignored: 3
    frames_ignored_after_loop: 0
    max_error_threshold: 0.02
    min_points_percent: 40
    max_loops: 3
    max_candidates: 5
    max_attempts: 15
    candidate_generation: "random" # 'random' or 'tree'
    icp:
      follow: "csm.yaml"

Note that the ICP parameters are contained in another file. This is useful to reuse them in other applications, and in this case, to provide both ProcessorLoopClosureIcp and ProcessorOdomIcp with the same parameters:

verbose:                      false # prints debug messages

# ALGORITHM OPTIONS
use_point_to_line_distance:   true  # use PlICP (true) or use vanilla ICP (false).
max_angular_correction_deg:   180   # Maximum angular displacement between scans (deg)
max_linear_correction:        10    # Maximum translation between scans (m)

max_correspondence_dist:      0.5   # Maximum distance for a correspondence to be valid
use_corr_tricks:              true  # Use smart tricks for finding correspondences. Only influences speed; not convergence.
debug_verify_tricks:          false # Checks that find_correspondences_tricks give the right answer

# STOP CRITERIA
max_iterations:               50    # maximum iterations
epsilon_xy:                   1e-4  # distance change
epsilon_theta:                1e-3  # angle change

# RESTART
restart:                      false # Restart algorithm
restart_threshold_mean_error: 0     # Threshold for restarting
restart_dt:                   0     # Displacement for restarting
restart_dtheta:               0     # Displacement for restarting

# DISCARDING POINTS/CORRESPONDENCES
min_reading:                  0.023 # discard rays outside of this interval
max_reading:                  60    # discard rays outside of this interval
outliers_maxPerc:             0.9   # Percentage of correspondences to consider: if 0.9, always discard the top 10% of correspondences with more error
outliers_adaptive_order:      0.7   # Parameters describing a simple adaptive algorithm for discarding
outliers_adaptive_mult:       1.5   # Parameters describing a simple adaptive algorithm for discarding
outliers_remove_doubles:      false # Do not allow two different correspondences to share a point
do_visibility_test:           false # If initial guess, visibility test can discard points that are not visible
do_alpha_test:                false # Discard correspondences based on the angles
do_alpha_test_thresholdDeg:   10    # 

# POINT ORIENTATION
clustering_threshold:         0.5   # Max-distance clustering for point orientation
orientation_neighbourhood:    4     # Number of neighbour rays used to estimate the orientation

# WEIGHTS
use_ml_weights:               false # weight the impact of each correspondence. This works fabolously if the first scan has no noise.
use_sigma_weights:            false # If the field "readings_sigma" is used to weight the correspondence by 1/sigma^2
sigma:                        0.2   # Noise of the scan

# COVARIANCE
do_compute_covariance:        true
cov_factor:                   5     # Factor multiplying the cov output of csm
cov_max_eigv_factor:          5     # Factor multiplying the direction of the max eigenvalue of the cov output of csm 

# VALIDATION & ATTEMPTS
attempts:                     3     # number of icp attempts if result fails (not valid or error > restart_threshold_mean_error) - TYPE unsigned int
perturbation_new_attempts:    1e-4  # MANDATORY if $attempts > 1: perturbation noise amplitude applied to initial guess from 2nd icp attempt - TYPE double
max_mean_error:               0.01  # Max mean error to consider the ICP result valid - TYPE double
min_points_ratio:             0.5   # Min ratio of points with correspondence to consider the ICP result valid - TYPE double